Skip to content

ImGui: Check for DILIGENT_DEAR_IMGUI_NO_IMPL to disable imgui system impl#244

Merged
TheMostDiligent merged 3 commits intoDiligentGraphics:masterfrom
espkk:add-cmake-flag-to-disable-imgui-system-backend
Apr 26, 2025
Merged

ImGui: Check for DILIGENT_DEAR_IMGUI_NO_IMPL to disable imgui system impl#244
TheMostDiligent merged 3 commits intoDiligentGraphics:masterfrom
espkk:add-cmake-flag-to-disable-imgui-system-backend

Conversation

@espkk
Copy link
Copy Markdown
Contributor

@espkk espkk commented Apr 12, 2025

No description provided.

@TheMostDiligent
Copy link
Copy Markdown
Contributor

This makes sense to me.
I am wondering if there is a way to check that the backend files present so that this check can be done automatically without adding extra CMake variables.

@espkk
Copy link
Copy Markdown
Contributor Author

espkk commented Apr 16, 2025

This makes sense to me.
I am wondering if there is a way to check that the backend files present so that this check can be done automatically without adding extra CMake variables.

This can easily be done in C++ with __has_include macro branching. An alternative is to check it on the cmake side and conditionally include the file and pass a definition with the filename.

Both slightly affect readability and cmake-based approach is probably logically more correct, but I would still prefer __has_include as it's more easy and transparent.
What do you think?

@TheMostDiligent
Copy link
Copy Markdown
Contributor

TheMostDiligent commented Apr 16, 2025

I actually prefer the CMake approach. Wondering, if something like this will work:

if(EXISTS "${DILIGENT_DEAR_IMGUI_PATH}/backends")

To me this seems to be the easiest way that does not require extra variables and just works automatically.

@espkk
Copy link
Copy Markdown
Contributor Author

espkk commented Apr 26, 2025

I actually prefer the CMake approach. Wondering, if something like this will work:

if(EXISTS "${DILIGENT_DEAR_IMGUI_PATH}/backends")

To me this seems to be the easiest way that does not require extra variables and just works automatically.

It's slightly less flexible, but it also works!

@TheMostDiligent TheMostDiligent merged commit b5d1cc8 into DiligentGraphics:master Apr 26, 2025
29 checks passed
@espkk espkk deleted the add-cmake-flag-to-disable-imgui-system-backend branch April 26, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants